package com.enjoy.concurrent.ch8;

import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit;

public class Item<E> implements Delayed {
    private E data;

    private long activeTime;

    public Item(E data, long activeTime) {
        this.data = data;
        this.activeTime = activeTime*1000+System.currentTimeMillis();
    }

    public E getData() {
        return data;
    }

    public void setData(E data) {
        this.data = data;
    }

    public long getActiveTime() {
        return activeTime;
    }

    public void setActiveTime(long activeTime) {
        this.activeTime = activeTime;
    }

    @Override
    public long getDelay(TimeUnit unit) {
        return 0;
    }

    @Override
    public int compareTo(Delayed o) {
        return 0;
    }
}
